Subject: Rnd() not very random, Mod() not quite working?
From: Jason Simpson <[email-masked]>
To: [email-masked]
Date: Mon, 12 Jul 93 21:13:19 -0700

Has anyone else noticed that Rnd() on small ranges (2-4 or so) doesn't
produce very random results? Try a routine like:
 
    LOOP
        x := Rnd(640)
        y := Rnd(400)
        c := Rnd(2) + 1  /* To offset from the background */
        Plot( x, y, c )
    ENDLOOP
 
  You should notice prominent bands of color.
 
  Also, when experimenting with RndQ(), I found that the Mod() function
didn't always return the expected value, for example Mod(40000001,400)
produces the result "610" -- it seems to do this mostly with larger numbers.

  Am I making incorrect assumptions here, or is there something wrong?